home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / devel / vbcc-68k-src / machines / amiga68k / libsrc / math / atan2.c < prev    next >
C/C++ Source or Header  |  1999-01-01  |  267b  |  10 lines

  1. #include <math.h>
  2.  
  3. #define PI 3.14159265358979323846
  4.  
  5. double atan2(double y,double x)
  6. { return x>=y?(x>=-y?      atan(y/x):     -PI/2-atan(x/y)):
  7.               (x>=-y? PI/2-atan(x/y):y>=0? PI  +atan(y/x):
  8.                                           -PI  +atan(y/x));
  9. }
  10.